<?php
include '../common.php';
$rule = [
	'icp'      => ['kong','ICP不能为空'],
	'systemname'  => ['kong','系统名称不能为空'],
	'copyright' => ['kong','版权不能为空'],
	'tel'     => ['kong','电话不能为空'],
	'tel'     => ['is_phone','电话不正确'],
];
$a = panduan($rule);
if($a['code'] == 0){
	exit($a['msg']);
}

$icp= trim($_POST['icp']);
$syname= trim($_POST['systemname']);
$coright= trim($_POST['copyright']);
$aboutus= trim($_POST['tel']);
$time = time();

$sql = "UPDATE config SET title = '$syname', ICP='$icp', copyright ='$coright', tel ='$aboutus',mftime ='$time'  WHERE id= 1";
$row = update($sql,$DB);
if (!$row) {
	exit('失败');
}

?>